package com.xqboss.apps.dto.synthesis;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "合成-方案数量", description = "出入参数")
public class SynthesisPlanUpdateDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @NotNull(message = "方案id不可为空")
    private Long id;

    @ApiModelProperty(value = "方案名称")
    private String name;

    @ApiModelProperty(value = "修改类型[1:修改方案名称;2:修改消耗所需数量;3:修改结果发放数量]")
    @NotNull(message = "修改类型不可为空")
    @Min(value = 1,message = "修改类型不合法")
    @Max(value = 3,message = "修改类型不合法")
    private Integer updateType;

    @ApiModelProperty(value = "消耗id或合成结果id")
    private Long detailId;

    @ApiModelProperty(value = "消耗数量")
    @Min(value = 1, message = "数量格式不合法")
    private Integer num;

    @Deprecated
    @ApiModelProperty(value = "装备-耐久阈值")
    private BigDecimal durableThreshold;

    @Deprecated
    @ApiModelProperty(value = "装备-破损阈值")
    private BigDecimal breakageThreshold;

    @Deprecated
    @ApiModelProperty(value = "装备-等级阈值")
    private Integer levelThreshold;

    @ApiModelProperty(value = "最小耐久值")
    private BigDecimal minDurable;

    @ApiModelProperty(value = "最大耐久值")
    private BigDecimal maxDurable;

    @ApiModelProperty(value = "最小破损值")
    private BigDecimal minBreakage;

    @ApiModelProperty(value = "最大破损值")
    private BigDecimal maxBreakage;

    @ApiModelProperty(value = "最小等级值")
    private Integer minLevel;

    @ApiModelProperty(value = "最大等级值")
    private Integer maxLevel;
}
